<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="servlets.LoginServlet" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String title = "";
if(request.getSession().getAttribute("title") != null)
	title = (String)request.getSession().getAttribute("title");
String isLoginA = (String)request.getSession().getAttribute("isLogin");
if(isLoginA != null && isLoginA.equals("true")){
%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>...::: BIENVENIDO A  <%=title %>:::...</title>
		<link rel="stylesheet" href="<%=request.getContextPath()%>/recurso/style.css">
		<script type="text/javascript">
			function submitFormWithValue(val){
  				cmd = document.getElementById('command');
  				cmd.value = val;
  				//alert("cmd "+cmd.value);
  				document.forms["test"].submit();
			}
		</script>
		
	</head>
	<body>
		<%@ include file="/jsps/menu.jsp" %>
		<form id="test" name="test" action="<%=request.getContextPath()%>/Login" method="post">
			<input type="hidden" name="command" id="command" value="" />
			<h1> Actualmente usted se encuentra en <%=title %></h1>
			<p>Elija Una Opcion del Menu</p>
			<%
			Cookie[] cookies = request.getCookies();
            if (cookies != null){
                for(int i=0; i<cookies.length; i++) {
                    if (cookies[i].getName().equals(lgs.cookie_name)){%>
                    	<p align="justify"">Los Valores contenidos en la cookie son:</br>
                    	<b><%=cookies[i].getValue() %></b></p>
                    <%}
                }
            }
			%>
			
		</form>
		
	</body>
</html>
<%
}else{
%>
<%@ include file="/index.jsp" %>
<%
}
%>